import org.centric.generator.GeneratorFacade;
import org.centric.generator.GeneratorProperties;
import org.centric.generator.util.GLogger;

public class GeneratorMain {

	/**
	 * 1.先定义一个类 不要任何字段 
	 * 2.Project.class 改成你的类
	 * 
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		GLogger.logLevel = GLogger.ERROR;

		GeneratorFacade g = new GeneratorFacade();
		g.deleteOutRootDir(); // 删除生成器的输出目录
		g.generateByClass(Project.class, "simple");

		// 打开文件夹
		Runtime.getRuntime().exec("cmd.exe /c start " + GeneratorProperties.getRequiredProperty("outRoot"));
	}
}
